package com.matt.foundation.constant;

import lombok.Setter;

/**
 * ****************
 * Created by Ron
 * from com.matt
 * on 2018/9/18 0018.
 * ********************
 */
public class LeadsConstant {

    //线索状态
    public enum Status {
        NON_HANDLE(1, "未处理"),
        LIE_OFF(2, "沟通中"), //初访
        VIEWED(3, "已邀约"),    //已邀约
        ARRIVED(4, "已到访"),
        NON_FEEL(5,"不感兴起"),
        NON_CONNECT(6,"未接通"),
        NON_LOCAL(7,"地域不符"),
        AGE_OVER(8,"孩子超龄"),
        NON_EFFECT_PHONE(9,"无效的联系方式"),
        DEMO_COURSE(10,"已邀约试听"),
        DEMO_COURSE_FINISH(11,"已试听");


        @Setter
        private int code;

        @Setter
        private String value;

        Status(int code, String value){
            this.code = code;
            this.value = value;
        }

        public int codeOf(){
            return code;
        }

        public String valueOf(){
            return value;
        }

        public Status get(int code){
            for (Status status : values()) {
                if (status.codeOf()==code)
                    return status;
            }
            return null;
        }
    }

    //线索转客户状态
    public enum ChangeStatus{
        NON_TRANSFER(0,"未转"),
        TRANSFER(1,"已转");
        @Setter
        private int code;

        @Setter
        private String value;

        ChangeStatus(int code, String value){
            this.code = code;
            this.value = value;
        }

        public int codeOf(){
            return code;
        }

        public String valueOf(){
            return value;
        }

        public ChangeStatus get(int code){
            for (ChangeStatus status : values()) {
                if (status.codeOf()==code)
                    return status;
            }
            return null;
        }
    }
}
